package wechat

import (
	"github.com/iGoogle-ink/gopay"
	"github.com/iGoogle-ink/gopay/pkg/util"
	"github.com/iGoogle-ink/gopay/wechat"
)

func InitSet() *gopay.BodyMap {
	return &gopay.BodyMap{}
}

// 设置请求结构体
func Set(sets map[string]interface{}) *gopay.BodyMap {
	body := InitSet()
	body.Set("nonce_str", util.GetRandomString(32)).Set("sign_type", wechat.SignType_MD5)
	for k, v := range sets {
		body.Set(k, v)
	}
	return body
}